/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.warehouse.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.service.TreeService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.warehouse.entity.Su;
import com.thinkgem.jeesite.modules.warehouse.dao.SuDao;

/**
 * suService
 * @author qrg
 * @version 2017-08-11
 */
@Service
@Transactional(readOnly = true)
public class SuService extends TreeService<SuDao, Su> {

	public Su get(String id) {
		return super.get(id);
	}
	
	public List<Su> findList(Su su) {
		if (StringUtils.isNotBlank(su.getParentIds())){
			su.setParentIds(","+su.getParentIds()+",");
		}
		return super.findList(su);
	}
	
	@Transactional(readOnly = false)
	public void save(Su su) {
		super.save(su);
	}
	
	@Transactional(readOnly = false)
	public void delete(Su su) {
		super.delete(su);
	}
	
}